package com.dly.blog.service;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;

/**
 * @Author: DaiLiYu
 * @Date: 2023/7/10 21:52
 */
@Configuration
public interface UserDetailsAuthService extends UserDetailsService {


    /**
     * 账号获取用户信息
     * @param account
     * @return
     */
    UserDetails loadUserByAccount(String account);


    /**
     * 邮箱 获取用户信息
     * @param username the username identifying the user whose data is required.
     * @return
     */
    UserDetails loadUserByUsername(String username);

    /**
     * Id 获取用户信息
     * @param id
     * @return
     */
    UserDetails loadUserById(String id);

    UserDetails loadUserByOpenId(String openId);

}
